﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class DicType : ActiveRecordBase<DicType>
    {
		#region Const Definition
		
		public const string CONST_DicTypeID								= "DicTypeID";
		public const string CONST_DicTypeValue							= "DicTypeValue";
		public const string CONST_DicTypeDesc							= "DicTypeDesc";
		public const string CONST_IsSystem								= "IsSystem";
		public const string CONST_IsEnabled								= "IsEnabled";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _dicTypeID;
        
        // Non Key
        private System.String _dicTypeValue;
        private System.String _dicTypeDesc;
        private System.Boolean _isSystem;
        private System.Boolean _isEnabled;

        // Parents
        
        
		

        #endregion

        public DicType() {
               
        }
        public DicType(
            System.String dicTypeValue
            ,System.String dicTypeDesc
            ,System.Boolean isSystem
            ,System.Boolean isEnabled) : this() {
                
            this._dicTypeValue = dicTypeValue; 
            this._dicTypeDesc = dicTypeDesc; 
            this._isSystem = isSystem; 
            this._isEnabled = isEnabled; 
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_DICTYPE_DICTYPEID")]
		#endif
        public System.Int32 DicTypeID {
            get { return this._dicTypeID; }
            set {  this._dicTypeID = value; }
        }
        
        // Non Key
        [Property]
        public System.String DicTypeValue {
            get { return this._dicTypeValue; }
			set { if (value == null) return; if (value.Length > 50) this._dicTypeValue = value.Substring(0,50); else this._dicTypeValue = value; }	
        }
        
        [Property]
        public System.String DicTypeDesc {
            get { return this._dicTypeDesc; }
			set { if (value == null) return; if (value.Length > 100) this._dicTypeDesc = value.Substring(0,100); else this._dicTypeDesc = value; }	
        }
        
        [Property]
        public System.Boolean IsSystem {
            get { return this._isSystem; }
			set { this._isSystem = value; }
        }
        
        [Property]
        public System.Boolean IsEnabled {
            get { return this._isEnabled; }
			set { this._isEnabled = value; }
        }
        
        
        // Parent Relationships
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public DicType Clone()
		{
			DicType newDicType = new DicType();
			
            newDicType.DicTypeValue = this._dicTypeValue; 
            newDicType.DicTypeDesc = this._dicTypeDesc; 
            newDicType.IsSystem = this._isSystem; 
            newDicType.IsEnabled = this._isEnabled; 
			return newDicType;
		}
    }
}



